Polymorphic typed defunctionalization and concretization

نویسندگان

  • François Pottier
  • Nadji Gauthier
چکیده

Defunctionalization is a program transformation that eliminates functions as first-class values. We show that defunctionalization can be viewed as a type-preserving transformation of an extension of System F with guarded algebraic data types into itself. We also suggest that defunctionalization is an instance of concretization, a more general technique that allows eliminating constructs other than functions. We illustrate this point by presenting two new type-preserving transformations that can be viewed as instances of concretization. One eliminates Rémy-style polymorphic records; the other eliminates the dictionary records introduced by the standard compilation scheme for Haskell’s type classes.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On the Relation of Interaction Semantics to Continuations and Defunctionalization

In game semantics and related approaches to programming language semantics, programs are modelled by interaction dialogues. Such models have recently been used in the design of new compilation methods, e.g. for hardware synthesis or for programming with sublinear space. This paper relates such semantically motivated non-standard compilation methods to more standard techniques in the compilation...

متن کامل

Modular polymorphic defunctionalization

Defunctionalization is generally considered a whole-program transformation and thus incompatible with separate compilation. In this paper, we formalize a modular variant of defunctionalization which can support separate compilation for a functional programming language with parametric polymorphism. Our technique allows modules in a Haskell-like language to be separately defunctionalized and com...

متن کامل

Flow-Directed Closure Conversion for Typed Languages

This paper presents a novel closure conversion strategy which is part of MLton, a whole-program compiler for Standard ML. Unlike other implementations, MLton performs closure-conversion at an early stage to translate programs to a simply-typed rst-order intermediate language upon which most optimizations are performed. Closure conversion is guided by a global control-ow analysis. Like previous ...

متن کامل

Type Checking and Inference for Polymorphic and Existential Types

This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be undecidable, and then it is proved that type inference is undecidable in the negation, conjunction, and existence fragment of the domain-free typed lambd...

متن کامل

⊂ ⊂ PolyGP : A Polymorphic Genetic Programming System in Haskell

In general, the machine learning process can be accelerated through the use of additional knowledge about the problem solution. For example, mono-morphic typed Genetic Programming (GP) uses type information to reduce the search space and improve performance. Unfortunately, monomorphic typed GP also loses the generality of untyped GP: the generated programs are only suitable for inputs with the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Higher-Order and Symbolic Computation

دوره 19  شماره 

صفحات  -

تاریخ انتشار 2006